# define _CRT_SECURE_NO_WARNINGS
# include <stdlib.h>
# include <time.h>
# include <stdio.h>
# define N 12
int delete_array(int array[])
{
	int i = 1;
	int flag = 1;
	int a = 1;
	int j = 0;
	printf("please input the element you want to delet:");
	scanf("%d",&a);
	for ( i = 0; i <N; i++)
	{
		if(a==array[i])
		{
			flag = 0;
			break;
		}
	}
	if (flag)
	{
		printf("The element is not present.");
	}
	else
	{
		for (j = i; j < N - 1; j++)
		{
			array[j] = array[j + 1];
		}
		printf("The deletion has been completed successfully.\n");
		printf("After deletion, the array elements are:\n");
		for (i = 0; i < N - 1; i++)
		{
			printf("%d ", array[i]);
		}
	}
	return 0;
}
int main()
   {
	srand((unsigned int)time(NULL));
	int i = 0;
	int array[] = { 0 };
	for ( i = 0; i < N; i++)
		array[i] = rand() % 100 + 1;
	for (i = 0; i < N; i++)
		printf("%d ", array[i]);
	printf("\n");
	delete_array(array);
	return 0;
	}
